home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / TPUG Xtras / Xtras / progdisk.d64 / moveman (.txt) < prev    next >
Commodore BASIC  |  2009-02-07  |  5KB  |  166 lines

  1. 10 FORK=0TO10:READDR(K):NEXT
  2. 20 FORI=12800TO13631:READX:POKEI,X:NEXT
  3. 30 PRINT"[144]":GOSUB 930
  4. 40 PRINT"[144]":PRINTCHR$(9)CHR$(142)CHR$(8)
  5. 50 PRINT"[147]":X=100:Y=100:GOSUB850
  6. 60 DATA0,145,17,0,157,0,0,0,29,0,0
  7. 70 POKE 808,225
  8. 80 :
  9. 90 PRINT"";
  10. 100 PRINT"READY  > ";
  11. 110 B$="":GETB$:IFB$=""THEN350
  12. 120 B=ASC(B$):IFB=148ORB=20ORB=19ORB=147THEN110
  13. 121 IF B=3 THEN 2000
  14. 130 IFB$=CHR$(145)ORB$=CHR$(17)ORB$=CHR$(29)ORB$=CHR$(157)ORB$=CHR$(13)THEN780
  15. 140 W$=B$:PRINTB$;
  16. 150 B$="":GETB$:IFB$=""THEN150
  17. 160 :
  18. 170 :
  19. 180 IFB$=CHR$(20)THENPRINTB$;:W$=LEFT$(W$,LEN(W$)-1):GOTO150
  20. 190 IFB$<>CHR$(13)THENW$=W$+B$:PRINTB$;:GOTO150
  21. 200 IFW$="RIGHT"THENY=Y+5:GOSUB430:GOTO320
  22. 210 IFW$="LEFT"THENY=Y-5:GOSUB510:GOTO320
  23. 220 IFW$="UP"THENX=X-5:GOSUB590:GOTO320
  24. 230 IFW$="DOWN"THENX=X+5:GOSUB670:GOTO320
  25. 240 IFW$="END"THENPRINT"[147]":END
  26. 250 PRINT"I DON'T UNDERSTAND.":FORI=1TO1500:NEXT:GOTO320
  27. 260 :
  28. 270 :
  29. 280 PRINT"                           ";
  30. 290 PRINT"                  ";:RETURN
  31. 300 :
  32. 310 :
  33. 320 GOSUB280:W$="":GOTO100
  34. 330 :
  35. 340 :
  36. 350 JV=PEEK(56320):FR=JVAND16:JV=15-(JVAND15)
  37. 360 IFDR(JV)=0THEN110
  38. 370 B$=CHR$(DR(JV)):GOTO780
  39. 380 :
  40. 390 :
  41. 400 IFY>255THENY=Y-255:POKEV+16,255
  42. 410 IFY>38ANDPEEK(V+16)>0THENY=38
  43. 420 RETURN
  44. 430 GOSUB400:S1=200:S2=206:S3=207:GOSUB720:Y=Y+5:GOSUB400
  45. 440 FORT=1TO200:NEXT:S1=204:S2=207:S3=206:GOSUB720
  46. 450 RETURN
  47. 460 :
  48. 470 :
  49. 480 IFY<30ANDPEEK(V+16)=0THENY=30
  50. 490 IFY<0THENY=Y+255:POKEV+16,0
  51. 500 RETURN
  52. 510 GOSUB480:S1=201:S2=209:S3=208:GOSUB720:Y=Y-5:GOSUB480
  53. 520 FORT=1TO200:NEXT:S1=205:S2=208:S3=209:GOSUB720
  54. 530 RETURN
  55. 540 :
  56. 550 :
  57. 560 IFX<60THENX=60
  58. 570 IFX>170THENX=170
  59. 580 RETURN
  60. 590 GOSUB560:S1=203:S2=210:S3=212:GOSUB720:X=X-5:GOSUB560
  61. 600 FORT=1TO200:NEXT:S1=203:S2=211:S3=212:GOSUB720
  62. 610 RETURN
  63. 620 :
  64. 630 :
  65. 640 IFX<60THENX=60
  66. 650 IFX>170THENX=170
  67. 660 RETURN
  68. 670 GOSUB640:S1=202:S2=210:S3=212:GOSUB720:X=X+5:GOSUB640
  69. 680 FORT=1TO200:NEXT:S1=202:S2=211:S3=212:GOSUB720
  70. 690 RETURN
  71. 700 :
  72. 710 :
  73. 720 POKEV+21,0:POKE2040,S1:POKE2041,S2:POKE2042,S3
  74. 730 POKEV,Y:POKEV+1,X
  75. 740 POKEV+2,Y:POKEV+4,Y:POKEV+3,X+42:POKEV+5,X+42:POKEV+21,7
  76. 750 RETURN
  77. 760 :
  78. 770 :
  79. 780 IFB$=CHR$(29)THENY=Y+5:GOSUB430:GOTO320
  80. 790 IFB$=CHR$(157)THENY=Y-5:GOSUB510:GOTO320
  81. 800 IFB$=CHR$(145)THENX=X-5:GOSUB590:GOTO320
  82. 810 IFB$=CHR$(17)THENX=X+5:GOSUB670:GOTO320
  83. 820 IFB$=CHR$(13)THEN250
  84. 830 :
  85. 840 :
  86. 850 V=53248:POKEV+29,255:POKEV+23,255:POKEV+28,255:POKEV+16,0
  87. 860 X=100:Y=100
  88. 870 POKE2040,202:POKE2041,210:POKE2042,212:POKEV,X:POKEV+1,Y
  89. 880 POKEV+2,X:POKEV+4,X:POKEV+3,Y+42:POKEV+5,Y+42
  90. 890 POKEV+21,7
  91. 900 RETURN
  92. 910 :
  93. 920 :
  94. 930 POKE53280,6:POKE53281,1:PRINT"[147]"
  95. 940 PRINTTAB(12)"              [146]"
  96. 950 PRINTTAB(12)" MOVE THE MAN [146]"
  97. 955 PRINTTAB(12)"              [146]"
  98. 960 PRINT"[151]   DO THIS SIMPLE DEMONSTRATION SHOWING"
  99. 970 PRINT" THREE OF THE  WAYS THE  COMPUTER MOVES"
  100. 990 PRINT" GRAPHIC OBJECTS ON THE SCREEN."
  101. 1000 PRINTTAB(7)"1. USE THE CURSOR CONTROLS"
  102. 1010 PRINTTAB(7)"2. TYPE ANY ONE COMMAND:"
  103. 1015 PRINTTAB(11)"UP           DOWN"
  104. 1016 PRINTTAB(11)"LEFT         RIGHT"
  105. 1018 PRINTTAB(11)"(AND PRESS RETURN)"
  106. 1020 PRINTTAB(7)"3. USE THE JOYSTICK"
  107. 1030 PRINTTAB(7)"PRESS THE F1 KEY TO START"
  108. 1040 PRINTTAB(9)"PRESS RUN/STOP TO END";
  109. 1050 GET A$:IF A$<>"[133]"     THEN 1050
  110. 1060 RETURN
  111. 2000 POKE908,0:POKE53269,0:POKE 808,237
  112. 2010 POKE 53269,0
  113. 2020 STOP
  114. 10000 DATA 3,255,0,3,255,0,63,255,240,3,183,0,3,191,0,3
  115. 10010 DATA 255,0,3,245,0,3,255,0,0,252,0,0,252,0,15,255
  116. 10020 DATA 0,15,255,192,15,15,192,12,15,192,12,63,192,0,63,192
  117. 10030 DATA 32,255,192,160,255,224,175,255,224,15,255,192,15,255,192,0
  118. 10040 DATA 3,255,0,3,255,0,63,255,240,3,123,0,3,251,0,3
  119. 10050 DATA 255,0,1,127,0,3,255,0,0,252,0,0,252,0,3,255
  120. 10060 DATA 192,15,255,192,15,15,192,15,3,192,15,192,192,15,240,0
  121. 10070 DATA 15,252,32,47,255,40,47,255,232,15,255,192,15,255,192,0
  122. 10080 DATA 3,255,0,3,255,0,63,255,240,11,119,128,11,255,128,3
  123. 10090 DATA 255,0,3,223,0,3,255,0,0,252,0,0,252,0,95,255
  124. 10100 DATA 212,95,255,212,95,255,212,95,255,212,95,255,212,95,255,212
  125. 10110 DATA 95,255,212,95,255,212,175,255,232,175,255,232,15,255,192,0
  126. 10120 DATA 3,255,0,3,255,0,63,255,240,11,255,128,11,255,128,3
  127. 10130 DATA 255,0,3,255,0,3,255,0,0,252,0,0,252,0,95,255
  128. 10140 DATA 212,95,255,212,95,255,212,95,255,212,95,255,212,95,255,212
  129. 10150 DATA 95,255,212,95,255,212,175,255,232,175,255,232,15,255,192,0
  130. 10160 DATA 3,255,0,3,255,0,63,255,240,3,183,0,3,191,0,3
  131. 10170 DATA 255,0,3,245,0,3,255,0,0,252,0,0,252,0,3,255
  132. 10180 DATA 192,15,255,192,15,15,192,15,3,192,15,192,192,15,240,0
  133. 10190 DATA 15,252,32,47,255,40,47,255,232,15,255,192,15,255,192,0
  134. 10200 DATA 3,255,0,3,255,0,63,255,240,3,123,0,3,251,0,3
  135. 10210 DATA 255,0,1,127,0,3,255,0,0,252,0,0,252,0,15,255
  136. 10220 DATA 0,15,255,192,15,15,192,12,15,192,12,63,192,0,63,192
  137. 10230 DATA 32,255,192,160,255,224,175,255,224,15,255,192,15,255,192,0
  138. 10240 DATA 3,80,0,0,212,0,0,212,0,0,212,0,0,53,0,0
  139. 10250 DATA 53,0,0,53,0,0,21,64,0,5,64,0,5,64,0,5
  140. 10260 DATA 64,0,1,80,0,3,252,0,3,252,0,0,0,0,0,0
  141. 10270 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  142. 10280 DATA 1,80,0,5,64,0,5,64,0,5,64,0,21,0,0,21
  143. 10290 DATA 0,0,21,0,0,21,0,0,84,0,0,84,0,0,84,0
  144. 10300 DATA 0,84,0,0,255,0,0,255,0,0,0,0,0,0,0,0
  145. 10310 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  146. 10320 DATA 0,21,0,0,5,64,0,5,64,0,5,64,0,1,80,0
  147. 10330 DATA 1,80,0,1,80,0,0,84,0,0,84,0,0,84,0,0
  148. 10340 DATA 84,0,0,21,0,0,255,0,0,255,0,0,0,0,0,0
  149. 10350 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  150. 10360 DATA 0,92,0,1,92,0,1,92,0,1,112,0,5,192,0,5
  151. 10370 DATA 192,0,5,192,0,5,64,0,21,0,0,21,0,0,21,0
  152. 10380 DATA 0,21,0,0,255,0,0,255,0,0,0,0,0,0,0,0
  153. 10390 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  154. 10400 DATA 5,69,64,5,69,64,5,69,64,5,69,64,5,69,64,5
  155. 10410 DATA 69,64,5,69,64,5,69,64,5,69,64,5,79,192,5,79
  156. 10420 DATA 192,5,64,0,15,192,0,15,192,0,0,0,0,0,0,0
  157. 10430 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  158. 10440 DATA 5,69,64,5,69,64,5,69,64,5,69,64,5,69,64,5
  159. 10450 DATA 69,64,5,69,64,5,69,64,5,69,64,15,197,64,15,197
  160. 10460 DATA 64,0,5,64,0,15,192,0,15,192,0,0,0,0,0,0
  161. 10470 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  162. 10480 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  163. 10490 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  164. 10500 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  165. 10510 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  166.